package basic;
//求指定位置的斐波那契数
public class basic509 {

    public int fib(int n) {
        if (n == 0) {
            return 0;
        }
        if (n == 1) {
            return 1;
        }

        return fib(n - 1) + fib(n - 2);

    }

    public static void main(String[] args) {
        basic509 basic509 = new basic509();
        System.out.println(basic509.fib(4));

    }
}

